﻿@using QDT.Common
@model IPagedList<QDT.Core.Domain.AdminUser>
<div class="main_title">
    管理员列表</div>
<div class="blank5">
</div>
<div class="button_row">
    <a class="button" href="@Url.Action("Add")">新增</a>
    <a class="button" href="javascript: del()">删除</a>
</div>
<div class="blank5">
</div>
<div class="grid_box">
    <div class="grid_top">
    </div>
    @Html.Grid(Model).Columns(column =>
                                  {
                                      column.CheckBox(x => x.ID);
                                      column.For(x => x.ID).Named("编号").HeaderAttributes(style => "width:50px;");
                                      column.For(x => Html.ActionLink(x.Name,"Edit", new { id = x.ID })).Named("管理员帐号").SortColumnName("Name");
                                      column.For(x => Html.F().GetRoleName(x.RoleID)).Named("管理员组").SortColumnName("RoleID");
                                      column.For(x => x.IsEffect ? "有效" : "无效").Named("状态").SortColumnName("IsEffect");
                                      column.For(x => x.LoginTime).Named("最后登录时间");
                                      column.For(x => x.LoginIP).Named("最后登录IP");
                                      column.Buttons(btns => btns.Add(x => Html.ActionLink("编辑", "Edit", new { id = x.ID }))
                                                                 .Add(x=>Html.ScriptLink("删除","del({0})".FormatWith(x.ID)))
                                                                 );
                                  }).Complex(ViewData)
    <div class="grid_foot">
    </div>
</div>
<div class="blank5">
</div>
@Html.Pager(Model)
